//
// 嗨~ o(*￣▽￣*)ブ
// Created by Mokou on 2020/7/14.
//

#import "GlobalData.h"

@implementation GlobalData

+ (GlobalData *)shareInstance {
    static dispatch_once_t onceToken;
    static GlobalData *instance;
    dispatch_once(&onceToken, ^{
        instance = [[self alloc] init];

        instance.db = [Database shareInstance];
        instance.fileSelector = [FileSelector shareInstance];
    });
    return instance;
}

@end

int const int_nil = -999999;

NSString *const method_channel_name = @"elec_mobile_native_plugin_method_channel";

NSString *const MSG_appDelegate_request_location_auth = @"MSG_appDelegate_request_location_auth";

/**
 * flutter方法名
 * */
NSString *const fcn_sysVer = @"fcn_sysVer";
NSString *const fcn_appVer = @"fcn_appVer";
NSString *const fcn_imei = @"fcn_imei";
NSString *const fcn_wifi_enabled = @"fcn_wifi_enabled";
NSString *const fcn_wifi_current = @"fcn_wifi_current";
NSString *const fcn_show_sysOption = @"fcn_show_sysOption";
NSString *const fcn_show_sysTel = @"fcn_show_sysTel";
NSString *const fcn_initBugly = @"fcn_initBugly";
NSString *const fcn_toast = @"fcn_toast";
NSString *const fcn_checkUpgrade = @"fcn_checkUpgrade";
NSString *const fcn_get_file_length = @"fcn_get_file_length";
NSString *const fcn_wifi_strength = @"fcn_wifi_strength";
NSString *const fcn_ios_request_location_auth = @"fcn_ios_request_location_auth";

NSString *const fcn_localStorage_insert_string = @"fcn_localStorage_insert_string";
NSString *const fcn_localStorage_insert_int = @"fcn_localStorage_insert_int";
NSString *const fcn_localStorage_delete = @"fcn_localStorage_delete";
NSString *const fcn_localStorage_update = @"fcn_localStorage_update";
NSString *const fcn_localStorage_select_string = @"fcn_localStorage_select_string";
NSString *const fcn_localStorage_select_int = @"fcn_localStorage_select_int";

NSString *const fcn_selectPhoto = @"fcn_selectPhoto";
NSString *const fcn_selectVideo = @"fcn_selectVideo";

NSString *const fcn_schedule_create = @"fcn_schedule_create";
NSString *const fcn_schedule_delete = @"fcn_schedule_delete";
NSString *const fcn_schedule_update = @"fcn_schedule_update";
NSString *const fcn_schedule_select = @"fcn_schedule_select";
NSString *const fcn_schedule_select_page = @"fcn_schedule_select_page";
NSString *const fcn_schedule_check_expired = @"fcn_schedule_check_expired";
NSString *const fcn_schedule_clear = @"fcn_schedule_clear";

NSString *const fcn_material_insert = @"fcn_material_insert";
NSString *const fcn_material_delete = @"fcn_material_delete";
NSString *const fcn_material_update = @"fcn_material_update";
NSString *const fcn_material_order = @"fcn_material_order";
NSString *const fcn_material_select = @"fcn_material_select";

NSString *const fcn_get_cache_file = @"fcn_get_cache_file";
NSString *const fcn_delete_cache_file = @"fcn_delete_cache_file";

NSString *const fcn_device_store = @"fcn_device_store";
NSString *const fcn_device_delete = @"fcn_device_delete";
NSString *const fcn_device_clear = @"fcn_device_clear";
NSString *const fcn_device_query = @"fcn_device_query";

NSString *const fcn_upgrade_create = @"fcn_upgrade_create";
NSString *const fcn_upgrade_clear = @"fcn_upgrade_clear";
NSString *const fcn_upgrade_delete = @"fcn_upgrade_delete";
NSString *const fcn_upgrade_download = @"fcn_upgrade_download";
NSString *const fcn_upgrade_update = @"fcn_upgrade_update";

NSString *const fcn_device_upgrade_query = @"fcn_device_upgrade_query";

/**
 * 本地数据库名
 * */
NSString *const db_name_schedule = @"elec_schedule";
NSString *const db_name_material = @"elec_material";
NSString *const db_name_relation = @"elec_relation";
NSString *const db_name_tmpMedia = @"elec_tmpMedia";
NSString *const db_name_device = @"elec_device";
NSString *const db_name_upgrade = @"elec_upgrade";

/**
 * 本地存储标识
 * */
NSString *const localStorage_key = @"localStorage";

/**
 * 本地素材文件目录
 * */
NSString *const localFileDir = @"localMediaFile";
NSString *const localUpgradeFileDir = @"localUpgradeFile";
NSString *const localUpgradeFileFir_cache = @"localUpgradeFile_cache";

